package com.doyens.gmall.product.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.doyens.gmall.model.product.*;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface ManageService {

//查询一级分类
    List<BaseCategory1> getCategory1();

    //根据一级分类id查询二级分类
    List<BaseCategory2> getCategory2(Long category1Id);

    //根据二级分类id查询三级分类
    List<BaseCategory3> getCategory3(Long category2Id);

    //根据一二三级分类的id 获取平台属性集合
    List<BaseAttrInfo> getAttrInfoList (Long category1Id,Long category2Id,Long category3Id);

    void saveAttrInfo(BaseAttrInfo baseAttrInfo);

    List<BaseAttrValue> getAttrValueList(Long attrId);

    BaseAttrInfo getBaseAttrInfo(Long attrId);

    IPage<SpuInfo> getSpuInfoList(Page<SpuInfo> spuInfoPage, Long category3Id);

    /**
     * 查询基本销售属性
     * @return
     */
    List<BaseSaleAttr> getBaseSaleAttrList();

    void saveSpuInfo(SpuInfo spuInfo);

    List<SpuImage> getSpuImageList(Long spuId);

    List<SpuSaleAttr> getSpuSalAttrList(Long spuId);

    //保存sku
    void saveSkuInfo(SkuInfo skuInfo);


    IPage getSkuInfoList(Page<SkuInfo> skuInfoPage);

    void onSale(Long skuId);

    void cancelSale(Long skuId);

    SkuInfo getSkuInfo(Long skuId);

    BaseCategoryView getCategoryViewByCategory3Id(Long category3Id);

    BigDecimal getSkuPrice(Long skuId);

    List<SpuSaleAttr> getSpuSaleAttrListCheckBySku(Long skuId,Long spiId);

    Map getSkuValueIdsMap(Long spuId);
}
